<?php
 require "./class_corpus.php";

 require "./class_document.php";
 require "./class_document_xml.php";
 require "../files/tool_files_dirs.php";
 require "../misc/class_tag.php";

 require "../tree/class_tree.php";
 require "../tree/class_tree_xhtml.php";
 require "../tree/class_structure.php";
 require "../tree/tool_tree.php";

 require "../string/tool_string.php";

 require "../array/tool_array.php";

 $corpus=tool_corpus::get_corpus_regexp("../xml/europa/","157.fr.xml");
 $array_doc=$corpus->__get_array_doc();
 $document=$array_doc[0];
// print_r(count($array_doc));
foreach($array_doc as $doc){
 $structure=$doc->__get_structure();
 echo tool_tree::structure2txt($structure);

}



die();
 //$document=new document_xml();
 //$document->__init("../xml/europa/celex_IP-04-901.el.xml");
 //$array_token=$document->__get_vals_token();
 //foreach($array_token as $token) print_r($token);
// echo $document;

//die();

 //$tree=$document->__get_xhtml_tree();
 //tool_tree::cleantreexhtml($tree);
 //echo tool_tree::tree_xhtml2xhtml($tree);
 //print_r($tree);
 //die();
 //$tree->__recalc_idn();


// $array_bloc=$document->__get_all_blocs();
// foreach($array_bloc as $tree){
//    echo tool_tree::tree2txt($tree);
//    echo "**********\n";
// }
 $tree=$document->__get_xhtml_tree();
 $tree->__recalc_idn();
 $array_bloc=$tree->__get_all_bloc_min(); 
 $bloc=$array_bloc[1];

 //$res=$document->__get_tab_frequence_bloc();
 //$res=$tree->__get_all_different_tag();
 //$res=$document->__get_mfm_cdt();
 $structure=$document->__get_structure();
 echo tool_tree::structure2txt($structure);

 //print_r($res);

//echo tool_tree::tree2txt($bloc);

//print_r($bloc->__get_first_str_mfm());
//echo tool_tree::tree_xhtml2signature($bloc);
//echo tool_tree::tree_xhtml2indentsignature($bloc);

// foreach($array_bloc as $t){
    //echo tool_tree::tree2txt($t);
    //print_r($t->__get_const_mfm());
    //echo "**********\n";
// }

 //$forest=new forest(array($tree));
 //$forest->__recalc_idn();
 //foreach($forest as $tree){
   //echo tool_tree::tree_xhtml2xhtml($tree);
   //print_r($tree);
 //}
 
 //echo tool_forest::forest2txt($forest);
// $val=$tree->__get_value();
// print_r($val);

 //print_r($tree); 


?>
